package edu.nus.mtech.sem1.ca.main;

import java.util.Vector;

import javax.swing.table.AbstractTableModel;

import edu.nus.mtech.sem1.ca.utils.Logger;

public class TelephonyJTableModel extends AbstractTableModel{
	
	Vector<String> header = null;
	Vector<Vector> data = null;
	
	public TelephonyJTableModel(Vector<String> header, Vector<Vector> data) {
		this.header=header;
		this.data=data;
		Logger.log("Before printing header and data");
		Logger.log("Header size :"+this.header.size());
		Logger.log("Data size :"+this.data.size());
	}
	
	 @Override
	 public int getRowCount() {
	     return data.size();
	 }
	 @Override
	 public int getColumnCount() {
	     return header.size();
	 }
	 @Override
	 public Object getValueAt(int rowIndex, int columnIndex) {
	     return data.get(rowIndex).get(columnIndex);
	 }
	 @Override
	 public String getColumnName(int column) {
	     return (String)header.get(column);
	 }
	 
	 @Override
	 public boolean isCellEditable(int row, int col){
		 return false;
	}
	
}
